//生日
#include <iostream>
#include <cstring>
using namespace std;
const int MAXN=40;
const int MOD=10000000;
int n,m;
int c[MAXN+10];
bool can=false;
struct HashTable{
    int data[MOD]={0};
    void init(){
        memset(data,0,sizeof(data));
    }
    void store(int x){
        int key=x % MOD;
        while(data[key]>0&&data[key]!=x){
            key++;
            key=key % MOD;
        }
        data[key]=x;
    }
    bool has(int x){
        int key=x % MOD;
        while(data[key]>0&&data[key]!=x){
            key++;
            key=key % MOD;
        }
        if (data[key]==x) return true;
        else return false;
    }
};
HashTable h1;
void lsearch(int k,int s){
    if (s>m) return ;
    else if (s==m){
        can=true;
        return;
    }else {
        if (s>0) h1.store(s);
        for(int i=k;i<=n/2;i++) lsearch(i+1,s+c[i]);
    }
}
void rsearch(int k,int s){
    if (s>m) return ;
    else if (s==m||h1.has(m-s)){
        can=true;
        return;
    }else {
        for(int i=k;i>n/2;i--) rsearch(i-1,s+c[i]);
    }
}
int main(){
    while(cin>>n){
        cin>>m;
        for(int i=1;i<=n;i++) cin>>c[i];
        h1.init();
        can=false;
        lsearch(1,0);
        if (!can) rsearch(n,0);
        if (can) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}